﻿using System.Data.Entity.ModelConfiguration;

namespace CubicFWNet.Data.Models.Mapping
{
    public class InventoryChangeMap: EntityTypeConfiguration<InventoryChange>
    {
        public InventoryChangeMap() {
            this.HasKey(t => t.Id);
            this.Property(t => t.Memo)
               .HasMaxLength(1024);
            this.ToTable("InventoryChange");
            
            this.Property(t => t.ProductId).HasColumnName("ProductId");
            this.Property(t => t.InStorageId).HasColumnName("InStorageId");
            this.Property(t => t.OutStorageId).HasColumnName("OutStorageId");
            this.Property(t => t.ConfirmId).HasColumnName("ConfirmId");
            this.Property(t => t.Confirm).HasColumnName("Confirm");
            this.Property(t => t.ConfirmTime).HasColumnName("ConfirmTime");
            this.Property(t => t.ProductId).HasColumnName("ProductId");
            this.Property(t => t.Amount).HasColumnName("Amount");
            this.Property(t => t.CreateTime).HasColumnName("CreateTime");
            this.Property(t => t.CreatorID).HasColumnName("CreatorID");
            this.Property(t => t.Memo).HasColumnName("Memo");
        }
    }
}
